﻿using System;
using System.Xml.Serialization;

namespace TiEntityObject.Contract
{
    public class GuaranteeContract 
    {
        public Int64 ID { get; set; }

        [XmlElement("procedure")]
        public string procedure { get; set; }


        [XmlElement("personalAccount")]
        public string PersonalAccount { get; set; }

        [XmlElement("settlementAccount")]
        public string SettlementAccount { get; set; }

        [XmlElement("bik")]
        public string Bik { get; set; }

        [XmlElement("isBail")]
        public int IsBail { get; set; }

        [XmlElement("amount")]
        public string s_amount { get; set; }

        public decimal amount
        {
            get
            {
                try
                {
                    if (string.IsNullOrEmpty(s_amount))
                        return 0;
                    else
                        return Convert.ToDecimal(s_amount);
                }
                catch
                {
                    return 0;
                }
            }
        }
     
    }
}   
